package com.hundsun.cprs.yyt.service.quota.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * @author herong22384
 * @date 2019/8/7 10:42
 */
public enum EnumQuotaExchangeStatus {

    WAIT_HANDLE(0,"待处理"),
    HANDLING(1,"处理中"),
    COMPLETED(2,"已完成");

    private Integer code;
    private String desc;

    EnumQuotaExchangeStatus(Integer code, String desc){
        this.code = code;
        this.desc = desc;
    }

    /**
     * 全局索引池
     */
    private static Map<Integer, EnumQuotaExchangeStatus> pool = new HashMap<Integer, EnumQuotaExchangeStatus>();
    static {
        for (EnumQuotaExchangeStatus et : EnumQuotaExchangeStatus.values()) {
            pool.put(et.code, et);
        }
    }

    public static Map<Integer, EnumQuotaExchangeStatus> toMap() {
        return pool;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
